package wzabind

import "wzgames/internal/model/mcomm"

type SysLoginReq struct {
	AdminName     string `json:"username" binding:"required,alphanum,min=2,max=32"`
	AdminPassword string `json:"password" binding:"required,md5,len=32"`
}

type SysAddAdminReq struct {
	AdminName     string       `json:"name" binding:"required,alphanum,min=2,max=32"`
	NickName      string       `json:"nick" binding:"required,alphanumunicode,min=1,max=32"`
	Avatar        string       `json:"avatar" binding:"alphanum,max=32"`
	AdminPassword string       `json:"pwd" binding:"required,md5,len=32"`
	Status        mcomm.Status `json:"status"`
}

type SearchReq struct {
	Keyword  string `form:"keyword" binding:"omitempty,alphanum,max=32"`
	Page     int    `form:"pagenum" binding:"omitempty,number"`
	PageSize int    `form:"pagesize" binding:"omitempty,number,max=200"`
	Field1   int32  `form:"field1" binding:"omitempty,number,min=0"`
	Field2   string `form:"field2" binding:"omitempty,max=50"`
}

type SysCurrencyReq struct {
	CurrId    int32  `json:"currid" binding:"required,number,min=1"`
	Name      string `json:"name" binding:"required,max=150"`
	Curr      string `json:"curr" binding:"required,alphanum,max=32"`
	CurrType  int32  `json:"currtype" binding:"required,number,min=1,max=3"`
	Precision int32  `json:"precision" binding:"number,min=0,max=20"`
	Status    int32  `json:"status" binding:"required,number,min=1,max=2"`
}

type SysLangReq struct {
	Name string `json:"name" binding:"required,max=30"`
	Desc string `json:"desc" binding:"required,max=150"`
}

type SysGameReq struct {
	GameId int32  `json:"gameid" binding:"required,number,min=1"`
	Name   string `json:"name" binding:"required,max=150"`
	GTag   string `json:"gtag" binding:"required,min=2,max=32"`
	Status int32  `json:"status" binding:"required,number,min=1,max=2"`
	Langs  string `json:"langs" binding:"omitempty,max=1000"`
	Grp    int32  `json:"grp" binding:"required,number,min=1"`
}

type SysGameCurrencyReq struct {
	GcId   int64  `json:"gcid" binding:"omitempty,number"`
	GameId int32  `json:"gameid" binding:"number,min=0"`
	Curr   string `json:"curr" binding:"required,alphanum,max=32"`
	VType  int32  `json:"vtype" binding:"required,number,min=1,max=2""`
	Desc   string `json:"desc" binding:"required,max=1000"`
	Cfg    string `json:"cfg" binding:"required,max=1000"`
	Status int32  `json:"status" binding:"required,number,min=1,max=2"`
}

type BetPendingSsReq struct {
	Page     int   `form:"pagenum" binding:"omitempty,number"`
	PageSize int   `form:"pagesize" binding:"omitempty,number,max=200"`
	Tp       int32 `form:"tp" binding:"omitempty,number,min=0,max=6"`
	NodeId   int64 `form:"nodeid" binding:"omitempty,number,min=1"`
	Uid      int64 `form:"uid" binding:"omitempty,number,min=1"`
	GameId   int32 `form:"gameid" binding:"omitempty,number,min=1"`
	RoundId  int64 `form:"roundid" binding:"omitempty,number,min=1"`
	InstId   int64 `form:"inst" binding:"omitempty,number,min=1"`
}

type WzUserReq struct {
	Uid      uint64 `form:"uid" binding:"number,min=0"`
	AgtId    int64  `form:"agtid" binding:"number,min=0"`
	Uname    string `form:"uname" binding:"omitempty,alphanum,max=64"`
	AgtUid   string `form:"agtuid" binding:"omitempty,alphanum,max=64"`
	PageSize int    `form:"pagesize" binding:"omitempty,number,max=200"`
	Page     int    `form:"pagenum" binding:"omitempty,number"`
}

type WzWalletTransferReq struct {
	Uid      uint64 `form:"uid" binding:"number,min=0"`
	OrderId  string `form:"fromid" binding:"omitempty,alphanum,max=64"`
	AcType   int32  `form:"actype" binding:"omitempty,number,min=-1,max=2"`
	Tid      int64  `form:"tid" binding:"number,min=0"`
	Curr     string `form:"curr" binding:"omitempty,alphanum,max=32"`
	PageSize int    `form:"pagesize" binding:"omitempty,number,max=200"`
	Page     int    `form:"pagenum" binding:"omitempty,number"`
}

type WzUserBetsReq struct {
	Uid      uint64 `form:"uid" binding:"number,min=0"`
	AgtId    int64  `form:"agtid" binding:"number,min=0"`
	BetId    int64  `form:"betid" binding:"number,min=0"`
	GameId   int32  `form:"gameid" binding:"omitempty,number,min=1"`
	RoundId  int64  `form:"roundid" binding:"omitempty,number,min=1"`
	InstId   int64  `form:"inst" binding:"omitempty,number,min=1"`
	Status   int32  `form:"status" binding:"omitempty,number,min=-1,max=3"`
	PageSize int    `form:"pagesize" binding:"omitempty,number,max=200"`
	Page     int    `form:"pagenum" binding:"omitempty,number"`
}
